{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Replacing a car\n", "## Problem definition\n", "At the beginning of each year, a car is in good, regular or bad state: \n", "\n", "- There is a 90% probability that a good car will be in a good state at the beginning of next year \n", "\n", "- There is a 5% probability that it will be in a regular state\n", "\n", "- and a 5 % probability that it will be in bad state. \n", "\n", "If a car is in a regular state, then:\n", "\n", "- There is a 70 % probability that the car is in again in regular state at the beginning of next year,\n", "- and a 30 % probability that it will be in a bad state.\n", "\n", "A bad car has no sale value and must be immediately replaced with a good one.\n", "\n", "It costs €12,000 to buy a good car, but a regular one can be found for €5,000.\n", "Maintenance costs are €1,000/year for a good car and €2,000 for a regular car, and must be paid upfront at the beginning of the year.\n", "\n", "Must I replace my car as soon as it is in a regular state, or must I wait until it is in a bad state?" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.7.4" } }, "nbformat": 4, "nbformat_minor": 2 }